﻿// YamlAuthoringScope.cs
//
// Copyright 2008 by Burt Harris
// Licensed under the Microsoft Public License (Ms-PL)
// See: http://www.codeplex.com/yaml/license
//
using System.Diagnostics;
using System.Globalization;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Package;
using Microsoft.VisualStudio.TextManager.Interop;

namespace YaTools.Yaml.LanguagePackage
{
    /// <summary>
    /// Visual Studio parse results for Yaml text.   Currently this is a no-op.
    /// </summary>
    internal class YamlAuthoringScope : AuthoringScope
    {
        public override string GetDataTipText(int line, int col, out TextSpan span)
        {
            span = new TextSpan();
            return null;
        }

        public override Declarations GetDeclarations(
            IVsTextView view, int line, int col, TokenInfo info, ParseReason reason)
        {
            Debug.WriteLine(string.Format(CultureInfo.InvariantCulture,
                                          "({0},{1}) : {2} : {3}", line + 1, col, info, reason));

            var result = new YamlDeclarations();

            return result;
        }

        public override Methods GetMethods(int line, int col, string name)
        {
            return null;
        }

        public override string Goto(
            VSConstants.VSStd97CmdID cmd, IVsTextView textView, int line, int col,
            out TextSpan span)
        {
            span = new TextSpan();
            return null;
        }
    }
}